<!DOCTYPE HTML>
<html xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <link rel="stylesheet" href="../css/currency/bootstrap.css"/>
    <link href="../css/H-ui.min.css" rel="stylesheet" type="text/css"/>
    <link href="../css/H-ui.admin.css" rel="stylesheet" type="text/css"/>
    <link href="../css/style.css" rel="stylesheet" type="text/css"/>
    <link href="../lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" href="../css/recipe.css"/>

    <title>广告购入价</title>
</head>

<body>
<nav class="breadcrumb" style="margin-bottom:0px"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span
        class="c-gray en">&gt;</span> 终端广告 <span class="c-gray en">&gt;</span>广告购入价
    <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px"
       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="pd-20" id="contract">
    <div class="text-c" id="advPriceList">
        <form search-form>
            <!-- TODO 根据业务需要修改搜索内容-->
            <span class="select-box" style="width:150px;">
                <select id="advChannel" class="select" v-model="condition.advChannel">
                     <option value="">-请选择广告商-</option>
                     <option value="2">美数平台</option>
                     <option value="3">百度平台</option>
                     <option value="4">点屏平台</option>
                     <option value="5">易售平台</option>
                     <option value="6">钼媒平台</option>
                </select>
            </span>
            <span class="select-box" style="width:150px;">
                <select id="status" class="select" v-model="condition.status">
                     <option value="">-请选择状态-</option>
                     <option value="0">失效</option>
                     <option value="1">未注册</option>
                     <option value="2">已注册</option>
                     <option value="3">试运行</option>
                     <option value="4">运行</option>
                     <option value="5">维护</option>
                     <option value="6">未认证</option>
                </select>
            </span>
            <span>
                <input type="text" v-model="condition.startDate" id="startDate-d" name="startDate"
                       @focus="changeTime('startDate-d')"
                       onfocus="WdatePicker({skin:'default',dateFmt:'yyyy-MM-dd HH:mm:ss'})"
                       class="input-text Wdate" style="width:160px;" placeholder="开始时间">-
                <input type="text" v-model="condition.overDate" id="overDate-d" name="overDate"
                       @focus="changeTime('overDate-d')"
                       onfocus="WdatePicker({skin:'default',dateFmt:'yyyy-MM-dd HH:mm:ss'})"
                       class="input-text Wdate" style="width:160px;" placeholder="结束时间">
            </span>
            <div id="selectBtnEnter" class="btn btn-primary" v-on:click="getList('search')">查询</div>
            <span class="l mr-5">
	                <a class="btn btn-primary radius addFormula" id="addUserPrice" @click="addOrUpdatePanel('add')">新增广告商购入价</a>
	            </span>
        </form>
        <form>
            <table class="table table-border table-bordered table-bg">
                <thead>
                <tr class="text-c">
                    <!--TODO 生成表头-->
                    <th nowrap="nowrap">广告渠道</th>
                    <th nowrap="nowrap">购入价</th>
                    <th nowrap="nowrap">单价</th>
                    <th nowrap="nowrap">状态</th>
                    <th nowrap="nowrap">创建人</th>
                    <th nowrap="nowrap">创建日期</th>
                    <th nowrap="nowrap">修改人</th>
                    <th nowrap="nowrap">修改日期</th>
                    <th nowrap="nowrap">操作</th>
                </tr>
                </thead>
                <tbody v-cloak>
                <tr id="aaa" class="text-c" v-for="(item,index) in pageInfo.list">
                    <td nowrap="nowrap">
                        <span v-if="item.advChannel=='1'">奥森平台</span>
                        <span v-else-if="item.advChannel=='2'">美数平台</span>
                        <span v-else-if="item.advChannel=='3'">百度平台</span>
                        <span v-else-if="item.advChannel=='4'">点屏平台</span>
                        <span v-else-if="item.advChannel=='5'">易售平台</span>
                        <span v-else-if="item.advChannel=='6'">钼媒平台</span>
                    </td>
                    <td nowrap="nowrap">{{item.price}}</td>
                    <td nowrap="nowrap">{{item.unitPrice}}</td>
                    <td nowrap="nowrap">
                        <span v-if="item.status=='0'">失效</span>
                        <span style="color: #00B83F" v-else-if="item.status=='1'">生效</span>
                    </td>
                    <td nowrap="nowrap">{{item.creator}}</td>
                    <td nowrap="nowrap">{{item.createTime}}</td>
                    <td nowrap="nowrap">{{item.modifier}}</td>
                    <td nowrap="nowrap">{{item.modifyTime}}</td>
                    <td nowrap="nowrap">
                        <span v-if="item.status=='1'">
                            <a class="btn btn-primary radius" @click="updateInit(item)">修改</a>
                        </span>
                    </td>
                </tr>
                </tbody>
            </table>
        </form>

        <div class="pageBox" v-cloak id="pageBox">
            <div class="pageInfo">显示 <span id="startRow">{{pageInfo.startRow}}</span> 到 <span id="endRow">{{pageInfo.endRow}}条</span>&nbsp;&nbsp;&nbsp;&nbsp;{{pageInfo.pages}}页&nbsp;&nbsp;&nbsp;&nbsp;共
                <span id="total">{{pageInfo.total}}</span> 条
                <select v-model="selectedPageSize" v-on:change="getList('changePageSize')">
                    <option value="5">5</option>
                    <option value="10">10</option>
                    <option value="15">15</option>
                    <option value="20">20</option>
                    <option value="50">50</option>
                </select>
            </div>
            <ul class="pagination" id="pagination"></ul>
        </div>
        <div class="tips" id="noData" align="center" style="display: none">
            无数据
        </div>
    </div>
    <!--TODO 添加、更新弹窗-->
    <form class="form form-horizontal" id="addPanel" style="display: none">
        <table class="table" border='0' width='100%'>
            <tr>
                <td width="30%" align="right" nowrap="nowrap">
                </td>
                <td width="40%" style="margin-left: 0px">
                </td>
                <td width="30%"></td>
            </tr>

            <tr id="t1">
                <td align="right" nowrap="nowrap">
                    <label class="form-label" style="padding:0px"><span class="c-red">*</span>广告商：</label>
                </td>
                <td>
                    <select name="advChannel" v-model="advChannel" class="input-text radius">
                        <option value="">-请选择广告商-</option>
                        <option value="2">美数平台</option>
                        <option value="3">百度平台</option>
                        <option value="4">点屏平台</option>
                        <option value="5">易售平台</option>
                        <option value="6">钼媒平台</option>
                    </select>
                </td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="advChannelErr!=''">{{advChannelErr}} </span></td>
            </tr>

            <tr>
                <td align="right" nowrap="nowrap">
                    <label class="form-label" style="padding:0px"><span class="c-red">*</span>购入价：</label>
                </td>
                <td>
                    <input type="text" class="input-text radius" name="price" v-model="price"
                           placeholder="请填写价格（单价：元/CPM）"/>
                </td>
                <td><span class="Validform_checktip Validform_wrong errorInfo"
                          v-if="priceErr!=''">{{priceErr}} </span></td>
            </tr>

            <tr>
                <td class="text-r"></td>
                <td class="text-c">
                    <a class="btn btn-primary radius" id="addCancel" v-on:click="reset">重置</a>
                    <a class="btn btn-primary radius" id="saveDictType" v-on:click="save">保存</a>
                </td>
                <td></td>
            </tr>

        </table>
    </form>

</div>
</body>

</html>
<script type="text/javascript" src="../js/common/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="../lib/layer/1.9.3/layer.js"></script>
<script type="text/javascript" src="../lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="../lib/icheck/jquery.icheck.min.js"></script>
<script type="text/javascript" src="../lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../js/common/H-ui.js"></script>
<script type="text/javascript" src="../js/common/H-ui.admin.js"></script>
<script type="text/javascript" src="../js/utils/utils.js"></script>
<script type="text/javascript" src="../js/currency/vue.js"></script>
<script type="text/javascript" src="../js/currency/vue-resource.min.js"></script>
<script type="text/javascript" src="../js/currency/base.js"></script>
<script type="text/javascript" src="../js/currency/jqPaginator.js"></script>
<script type="text/javascript" src="../js/advPrice.js"></script>